#ifndef PLANE_H
#define PLANE_H

#include "AABB.h"
#include "Geometry.h"

struct AABB;

struct WPlane: public Geometry {
    vec3 normal;
    vec3 nPrime;
    float distance;

    WPlane() {
        name = "Plane";
    }

    Symbol parse(ifstream &file, Symbol curToken);
    bool intersect(Ray *r);
    vec3 getNormal(Ray *r);

    void print() {
        printf("Plane:\n\tNormal: %f %f %f\n\tDistance: %f\n",
            normal.x, normal.y, normal.z, distance);

        Geometry::print();
    }

    AABB *generateAABB() {
        return NULL;
    }

    int type() {
        return 1;
    }
};


#endif
